const STORAGE_KEY = 'smr-blade-session'
export default {
  fetch(key) {
    return window.sessionStorage.getItem(STORAGE_KEY + '-' + key)
  },
  save(key, items) {
    window.sessionStorage.setItem(STORAGE_KEY + '-' + key, items)
  },
  saveObject(key, items) {
  	window.sessionStorage.setItem(STORAGE_KEY + '-' + key, JSON.stringify(items))
  },
  fetchObject(key) {
  	return JSON.parse(window.sessionStorage.getItem(STORAGE_KEY + '-' + key) || '[]')
  },
  delete(key) {
    window.sessionStorage.removeItem(STORAGE_KEY + '-' + key)
  }
}
